package net.csdn.business.common.domain.query;

import lombok.Data;
import net.csdn.business.common.enums.IssueEnum;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import java.util.List;

/**
 * @program: openatom
 * @description: issue分页查询query
 * @author: zhangyl
 * @create: 2024-08-14 16:55
 **/

@Data
public class IssuePageQuery {

    /**
     * 当前登录用户id
     */
    private String currUserId;

    @Length(max = 50, message = "keyword 不能超过50个字符")
    private String key;

    /** 排序：1、按更新时间降序；2、按更新时间升序；3、按创建时间降序；4、按创建时间升序； **/
    @Range(min = 1, max = 4, message = "status 不合法")
    private Integer order = IssueEnum.OrderByEnum.RECENTLY_UPDATE.getValue();

    @Range(min = 1, max = 2, message = "status 不合法")
    private Integer status;

    /**
     * 按优先级筛选
     */
    private List<String> prioritys;

    @Range(min = 1, max = 200, message = "pageNum 不合法")
    private int pageNum = 1;

    @Range(min = 1, max = 1000, message = "pageSize 不合法")
    private int pageSize = 10;

    /**
     * 按创建人id筛选
     */
    private List<String> creators;


    /**
     * 组织path,根据组织path查询组织下仓库id
     */
    private String orgPath;

    /**
     * 按标签筛选
     */
    // @Size(min = 24, max = 24, message = "labelId 不合法")
    private List<String> labelIds;

    /**
     * 按负责人筛选
     */
    private List<String> assignUsers;

    /**
     * 按里程碑id筛选
     */
    private List<String> milepostIds;


    private List<String> projectIds;

    private List<String> issueIds;

    /** 是否查询总数 **/
    private Boolean isTotal=false;

    /** 是否导出 **/
    private Boolean isExport=false;
}
